<?php $this->load->view('partial/head'); ?>

<script>
$(function(){
	$('.dataTables').dataTable();
});
</script>

<h1>Paket Makanan</h1>

<a href="<?=base_url()."index.php/koki/add_paket/"?>" style="margin-bottom: 20px; display: block">Tambah Paket Makanan</a>

<?php if($pesan != NULL){
	echo "<div class='form-info ".($pesan['success'] ? 'success' : 'fail')."'>".$pesan['pesan']."</div>";
} ?>

<table class="dataTables" cellspacing="0" width="100%">
	<thead>
		<tr>
			<th width="5%">No.</th>
			<th>Nama</th>
			<th>Harga</th>
			<th>Deskripsi</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<?php $no= 1; foreach($paket as $paket){ ?>
			<tr>
				<td><?=$no?></td>
				<td><?=$paket['nama']?></td>
				<td>Rp. <?=$paket['harga']?></td>
				<td><?=$paket['deskripsi']?></td>
				<td>
					<a href="<?=base_url()."index.php/koki/edit_paket/".$paket['id_paket']?>" title="Edit paket makanan">Edit</a> | 
					<a href="<?=base_url()."index.php/koki/delete_paket/".$paket['id_paket']?>" title="Hapus paket makanan">Hapus</a>
				</td>
			</tr>
		<?php $no++; } ?>
	</tbody>
</table>